package com.slz3.business.module.socialManagement.socLife.steward;

import com.slz3.business.module.socialManagement.socLife.domain.SocLife;
import com.slz3.business.module.socialManagement.socLife.domain.SocLifeCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class SocLifeResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(SocLife.class).flatMap(socLife ->
                SocLifeResController.add(req, socLife)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(SocLifeCondition.class).flatMap(socLifeCondition ->
                SocLifeResController.delete(req, socLifeCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(SocLife.class).flatMap(socLife ->
                SocLifeResController.modify(req, socLife)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return SocLifeResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return SocLifeResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return SocLifeResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(SocLifeCondition.class).flatMap(socLifeCondition ->
                SocLifeResController.auditSubmit(req, socLifeCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(SocLifeCondition.class).flatMap(socLifeCondition ->
                SocLifeResController.audit(req, socLifeCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(SocLifeCondition.class).flatMap(socLifeCondition ->
                SocLifeResController.auditReject(req, socLifeCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(SocLifeCondition.class).flatMap(socLifeCondition ->
                SocLifeResController.usingEnable(req, socLifeCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(SocLifeCondition.class).flatMap(socLifeCondition ->
                SocLifeResController.usingDisable(req, socLifeCondition)
        );
    }   

}
